<template>
  <div class="container">
    <div class="error">
      <h1>您访问的页面不存在或您没有权限访问</h1>
      <el-button type="primary" size="large" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';
const router = useRouter();
const goHome = () => {
  router.push({ path: '/home' });
};
</script>

<style scoped lang="scss">
.container {
  width: 100%;
  height: 100vh;

  .error {
    position: relative;
    left: 0;
    top: 0;

    h1 {
      font-size: 50px;
    }
  }

  background-image: url(../../assets/images/error_images/404.png);
  background-size: cover;
  background-repeat: no-repeat;
}
</style>
